import java.util.*;

public class ZijieDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char res[] = sort(str);
        for (int i = 0; i < res.length; i++) {
            System.out.print(res[i]);
        }
//        String[] nab = sc.nextLine().split(" ");
//        int n = Integer.parseInt(nab[0]),a = Integer.parseInt(nab[1]),b=Integer.parseInt(nab[2]);
//        String []valueString = sc.nextLine().split(" ");
//        int result = dfs(n,a,b,valueString);
//        int n = Integer.parseInt(sc.nextLine());
//        String[] weights = sc.nextLine().split(" ");
//        int result = lastStoneWeight(weights,n);
//        System.out.println(result);
    }

    private static char[] sort(String strs) {
        int l = 0, r=1;
        char[] str = strs.toCharArray();
        if(str == null || str.length==0 )return null;else if(str.length==1) return str;
        ArrayList<Integer> indexs = new ArrayList<>();
        int minIndex = Integer.MAX_VALUE,maxIndex = Integer.MIN_VALUE;
        for (int i = 0; i < str.length; i++) {
            if(str[i]>='0' && str[i]<='9'){
                indexs.add(str[i]-'0');
            }else{
                minIndex = Math.min(i,minIndex);
                maxIndex = Math.max(i,maxIndex);
            }
        }
        if(str[minIndex]>str[maxIndex]){
            Collections.sort(indexs, new Comparator<Integer>() {
                @Override
                public int compare(Integer o1, Integer o2) {
                    return o2-o1;
                }
            });
        }else Collections.sort(indexs);
        for (int i = 0,j=0; i < str.length&&j<indexs.size(); i++) {
            if(str[i]>='0' && str[i]<='9'){
                str[i] = (char) (indexs.get(j++)+'0');
            }
        }
        while (r<str.length&&l<str.length){
            if((str[r]<='9'&&str[r]>='0')){
                r = r+1;
            }else{
                if((str[l]<='9'&&str[l]>='0')){
                    l = l+1;
                }else {
                    // 更新数组
                    boolean desc = (str[l] <= str[r]) ? true : false;
                    if (!desc) {
                        Arrays.sort(str, l + 1, r);
                        int left = r - 1, right = l + 1;
                        while (right <= left) {
                            char swap = str[left];
                            str[left] = str[right];
                            str[right] = swap;
                            right++;
                            left--;
                        }
                    }
                    r = r + 1;
                    if(r<str.length && !(str[r]<='9'&&str[r]>='0')){
                        r = r+1;
                    }
                    l = l + 1;
                }
            }
            if((str[l]<='9'&&str[l]>='0')){
                l = l+1;
            }

        }
        return str;
    }

    private static int dfs(int n, int a, int b, String[] valueString) {
        for (int i = 0; i < valueString.length; i++) {

        }
        return 0;
    }

    private static int lastStoneWeight(String[] weights,int n) {
        int sum = 0;
        if(weights.length==1) return Integer.parseInt(weights[0]);
        for (String weight : weights) {
            sum += Integer.parseInt(weight);
        }
        int mid = sum/2;
        int [] dp = new int[mid+1];
        for (int i = 0; i < n; i++) {
            int weight = Integer.parseInt(weights[i]);
            for (int j = mid; j >= weight; j--) {
                if(dp[j]+weight>j){
                    dp[j] = Math.max(dp[j],dp[j-weight]+weight);
                }else{
                    dp[j]+= weight;
                }
            }
        }
        return sum-2*dp[mid];
    }
}
